<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>商品详情</title>
    <th:block th:include="~{common/common::commonHead}"/>
</head>
<style>
    #left img {
        margin: 20px;
    }
    #right .zz{
        display: block;
        margin-top: 20px;
    }
    .goods{
        font-size: 16px;
    }
    .goods span{
        font-size: 16px;
        font-weight: bold;
    }
</style>
<body data-width="850" data-height="500">
<div class="container-fluid">
    <div id="left" class="col-md-6 col-sm-6 col-xs-12">
        <div >
            <img src="" id="goodsImg" width="350" height="350">
        </div>
    </div>
    <div id="right"  class="col-md-6 col-sm-6 col-xs-12">
        <div class="zz">
            <div class="goods"> 监所名称:&nbsp;&nbsp;&nbsp;<span id="prisonsName"></span> </div>
        </div>
        <div class="zz">
            <div class="goods"> 商品名称:&nbsp;&nbsp;&nbsp;<span id="goodsName"></span> </div>
        </div>
        <div class=" zz">
            <div class="goods"> 零售价:&nbsp;&nbsp;&nbsp;<span id="goodsMarketPrice"></span></div>
        </div>
        <div class=" zz">
            <div class="goods"> 供应价: &nbsp;&nbsp;&nbsp;<span id="goodsSellPrice"></span></div>
        </div>
        <div class=" zz">
            <div class="goods"> 结算价:&nbsp;&nbsp;&nbsp;<span id="goodsSettlementPrice"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 商品类型: &nbsp;&nbsp;&nbsp;<span id="goodsTypeName"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 单位: &nbsp;&nbsp;&nbsp;<span id="goodsUnit"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 规格: &nbsp;&nbsp;&nbsp;<span id="goodsSpec"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 箱规: &nbsp;&nbsp;&nbsp;<span id="goodsUnit"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 条码: &nbsp;&nbsp;&nbsp;<span id="goodsBarCode"></span></div>
        </div>
        <div class="zz">
            <div class="goods"> 状态: &nbsp;&nbsp;&nbsp;<span id="goodsStatusStr"></span></div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    $(function () {
        var params = $.getUrlParams();
        $.doAjax("goodsPublish/getGoodsPublishDetail", params, function (goods) {
            if(goods['boxSpec']===null ){
                $("#boxSpec").text();
            }else{
                $("#boxSpec").text(goods['boxSpec']);
            }
            if(goods['goodsSpec']===null ){
                $("#goodsSpec").text();
            }else{
                $("#goodsSpec").text(goods['goodsSpec']);
            }
            if(goods['goodsBarCode']===null ){
                $("#goodsBarCode").text();
            }else{
                $("#goodsBarCode").text(goods['goodsBarCode']);
            }
            $("#goodsImg").attr("src", ""+goods.goodsImg+"");
            $("#prisonsName").text(goods['prisonsName']);
            $("#goodsName").text(goods['goodsName']);
            $("#goodsMarketPrice").text((Number(goods['goodsMarketPrice']))/100);
            $("#goodsSellPrice").text((Number(goods['goodsSellPrice']))/100);
            $("#goodsSettlementPrice").text((Number(goods['goodsSettlementPrice']))/100);
            $("#goodsTypeName").text(goods['goodsTypeName']);
            $("#goodsUnit").text(goods['goodsUnit']);
            $("#goodsStatusStr").text(goods['goodsStatusStr']);
        });

    });
</script>